﻿<UserControl xmlns:PageBar="clr-namespace:Mengsk.ProxyDelivery.App.UI.PageBar"  x:Class="Mengsk.ProxyDelivery.App.UI.Accounting.WidthdrawUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="1100" Loaded="UserControl_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0" Orientation="Horizontal">

            <TextBlock Text="状态:" Margin="3" VerticalAlignment="Center"/>
            <ComboBox Margin="3" VerticalAlignment="Center" Name="cbbStates" Width="100"/>

            <TextBlock Text="卖家编号:" Margin="3" VerticalAlignment="Center"/>
            <TextBox Name="tbSellerId" Margin="3" VerticalAlignment="Center" Width="100"/>

            <TextBlock Text="提现人员:" Margin="3" VerticalAlignment="Center"/>
            <TextBox Name="tbCompleteOperator" Margin="3" VerticalAlignment="Center" Width="100"/>

            <TextBlock Text="描述:" Margin="3" VerticalAlignment="Center"/>
            <TextBox Name="tbComment" Margin="3" VerticalAlignment="Center" Width="100"/>

            <TextBlock Text="创建时间:" Margin="3" VerticalAlignment="Center"/>
            <DatePicker Name="dpStartCreateTime" Width="120" VerticalAlignment="Center"/>
            <TextBlock Text="到:" Margin="3" VerticalAlignment="Center"/>
            <DatePicker Name="dpEndCreateTime" Width="120" VerticalAlignment="Center"/>
            <Button Name="btnSearch" Content="查询" Width="60" Margin="3" VerticalAlignment="Center" Click="btnSearch_Click"/>
        </StackPanel>

        <StackPanel Orientation="Horizontal" Grid.Row="1">
            <Button Name="btnAccept" Content="审核通过" Margin="3" VerticalAlignment="Center" Width="80" Click="btnAccept_Click"/>
            <Button Name="btnReject" Content="审核拒绝" Margin="3" VerticalAlignment="Center" Width="80" Click="btnReject_Click"/>
            <Button Name="btnComplete" Content="完成提现" Margin="3" VerticalAlignment="Center" Width="80" Click="btnComplete_Click"/>
            <TextBlock Name="tbTotal" Text="" Margin="3" VerticalAlignment="Center"/>
        </StackPanel>

        <DataGrid Grid.Row="2" Name="dgvItems" Margin="3" GridLinesVisibility="All" IsReadOnly="False" CanUserAddRows="False" SelectionMode="Single" AutoGenerateColumns="False">
            <DataGrid.Columns>
                <DataGridCheckBoxColumn Header="选择" Binding="{Binding IsChecked}"/>
                <DataGridTextColumn Header="编号" Binding="{Binding Source.Id}" IsReadOnly="True"/>
                <DataGridTextColumn Header="卖家编号" Binding="{Binding Source.SellerId}" IsReadOnly="True"/>
                <DataGridTextColumn Header="提现账户" Binding="{Binding Source.PayAccount}" IsReadOnly="True"/>
                <DataGridTextColumn Header="提现金额" Binding="{Binding Source.Money}" IsReadOnly="True"/>
                <DataGridTextColumn Header="创建时间" Binding="{Binding Source.CreateTime,Converter={StaticResource datetimeConverter}}" IsReadOnly="True"/>
                <DataGridTextColumn Header="审核时间" Binding="{Binding Source.CheckTime,Converter={StaticResource datetimeConverter}}" IsReadOnly="True"/>
                <DataGridTextColumn Header="完成时间" Binding="{Binding Source.CompleteTime,Converter={StaticResource datetimeConverter}}" IsReadOnly="True"/>
                <DataGridTextColumn Header="审核人员" Binding="{Binding Source.CheckOperator}" IsReadOnly="True"/>
                <DataGridTextColumn Header="完成人员" Binding="{Binding Source.CompleteOperator}" IsReadOnly="True"/>
                <DataGridTextColumn Header="描述" Binding="{Binding Source.Comment}" IsReadOnly="True"/>
                <DataGridTextColumn Header="状态" Binding="{Binding State,Converter={StaticResource descriptionConverter}}" IsReadOnly="True"/>
            </DataGrid.Columns>

            <DataGrid.ContextMenu>
                <ContextMenu >
                    <MenuItem Header="审核通过"/>
                    <MenuItem Header="审核拒绝"/>
                    <MenuItem Header="完成提现"/>
                </ContextMenu>
            </DataGrid.ContextMenu>
        </DataGrid>
        <PageBar:PageBarUserControl Grid.Row="3" x:Name="pbBar" PageSize="200" PageChanging="pbBar_PageChanging" />

    </Grid>
</UserControl>
